package day10_io_code.com.itheima.d2_buffer_stream;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class BufferedWriterDemo3 {
    public static void main(String[] args) {
        try (
                FileWriter fw = new FileWriter("d:\\demo\\c.txt", true);
                BufferedWriter bw = new BufferedWriter(fw);
        ) {
            bw.write(97);
            bw.write('磊');
            bw.write("\r\n");
            bw.newLine();

            bw.write("我爱你");
            bw.write("\r\n");

            bw.write("中国", 1, 1);
            bw.write("\r\n");



            char[] chars = "abc我爱你中国".toCharArray();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
